from authkit.permissions import HasAuthKitRole
from authkit.authorize.pylons_adaptors import authorize

from authtest.lib.base import BaseController

has_delete_role_permission = HasAuthKitRole(["admin"])

class AuthController(BaseController):

    def index(self):
        '''
        '''

    def public(self):
        return 'This is public'

    @authorize(has_delete_role_permission)
    def private(self):
        '''
        '''
        return 'You are authenticated!'

    def signout(self):
        return 'Successfully signed out!'

